cc.Class({
    extends: cc.Component,

    properties: {
        game: {
            default: null,
            type: cc.Node
        },
    },


     onLoad () {
		 
		 
		 this.node.on(cc.Node.EventType.TOUCH_START,function(event){
			 
			
			var tx = event.getLocationX(),ty = event.getLocationY();
			
			var game = this.game.getComponent('GameByChapter');
			
			var width = game.width;
			
			if(game.useHummerFlag||game.useMagicFlag){
				
				console.log("top .. ");
				
				game.effectMast.active = false;
				
				if(game.useHummerFlag){
					game.useHummerOver(tx,ty);
				}else if(game.useMagicFlag){
					game.useMagicOver(tx,ty);
				}
				
			}
			
		}.bind(this));
		 
	 },

    
});
